Processing units which calculate mathematical functions, such as trigonometric functions, are used for various computers, including supercomputers. Such a processing unit normally calculates mathematical functions with approximation, using a Taylor series operation. For example, the mathematical function f(x) is given by the Taylor series operation expression as indicated by FIG. 22.
In order to calculate a value of the mathematical function f(x) in an arbitrary value (input argument) x using a Taylor series operation as indicated by FIG. 22, the calculation of the processing unit is divided into a pre-processing portion and a post-processing portion. The pre-processing portion determines an expansion point x0 of the Taylor series operation, and a table of the Taylor series coefficient ((1/n!)·f(n)(x0)), corresponding to this expansion point. The post-processing portion executes the Taylor series operation in FIG. 22 using the Taylor series coefficient table.
If the mathematical function is a sin function, for example, an expansion point x0 of the Taylor series operation, as indicated by FIG. 23, is determined, and a Taylor series coefficient ((1/n!·f(n)(x0)) corresponding to this expansion point is determined.
In other words, since a sin function has periodicity, when an integral multiple of π/2 is an expansion point near an input argument x, the Taylor series expansion point x0 is calculated by a quotient (q) of the input argument x divided by π/2. Then the expansion function and the Taylor series coefficient, corresponding to the remainder when the quotient (q) is divided by “4” (q %4), are determined.
If the remainder is “0”, for example, the expansion function is sin (x−xo), the Taylor series coefficient is ((1/n!)·f(n)(x0))=(−1)n/(2*n+1)!. Therefore the Taylor series in FIG. 22 is Σ(−1)n/(2*n+1)!*(x−x0)(2n+1). In FIG. 23, “**” indicates a power, “!” indicates a factorial, and “*” indicates multiplication.
In a prior art, determination of the Taylor series expansion function, data transfer between a floating point register and an integral register and computing processing using an integral computing unit for a mask operation, shift operation and the like execute to determine the Taylor series expansion function and to calculate an input argument for the expansion function before executing the Taylor series operation of a trigonometric function, by using such instructions as a load instruction and shift instruction, and.    [Patent Document 1] Japanese Patent Application Laid-Open No. 2008-234076 (FIG. 1 to FIG. 7)    [Patent Document 2] Japanese Patent Application Laid-Open No. 2002-063152 (FIG. 1 to FIG. 7)
Along with the current demand for faster computer processing, faster speed is also demanded of a Taylor series operation for mathematical functions. In prior art, in order to determine a Taylor series expansion function and to calculate the input argument for the expansion function, a data transfer between a floating point register and an integral register and complicated processing including mask operation and shift operation are required using such instructions as a load instruction and shift instruction. Therefore overhead other than a floating point operation (e.g. integral operation instruction and memory access instruction) is generated.
In other words, many instructions are required to process an entire mathematical function operation, therefore factors that drop performance, such as hampering instruction that issues throughput, exist.